package com.example.module_lzq_haibathree.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Time {

    public static String nyrsfm(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        Date date = new Date();
        String formattedDate = sdf.format(date);
        return formattedDate;
    }

    public static String dtrq(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date date = new Date();
        String formattedDate = sdf.format(date);
        return formattedDate;
    }
    public static String rg(){
        SimpleDateFormat sdf = new SimpleDateFormat("MM-dd");
        Date date = new Date();
        String formattedDate = sdf.format(date);
        return formattedDate;
    }

    public static String swsj(){
        Date date = new Date(System.currentTimeMillis());
        String time = new SimpleDateFormat("hh:mm").format(date);
        String asd = new SimpleDateFormat("a").format(date);
        if (asd.equals("下午")) {
            time = new SimpleDateFormat("HH:mm").format(date);
        }
        return time;
    }

    public static String yrz(){
        String[] chineseNumbers = {"日", "一", "二", "三", "四", "五", "六"};
        String chineseNumber = chineseNumbers[Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1];
//        String s = Calendar.getInstance().get(Calendar.MONTH) + 1 + "月" + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + "日  星期" + chineseNumber;
        String s = "  星期" + chineseNumber;
        return s;
    }

/*    public static String sbsj(){
        String yqModuleSetClockInTimeForWork = YqModelSpUtil.getString("yqModuleSetClockInTimeForWork", "");
        if(yqModuleSetClockInTimeForWork.length()!=0){
            return yqModuleSetClockInTimeForWork;
        }
        return "09:00";
    }*/

/*    public static String xbsj(){
        String yqModuleSetAfterClockInTimeForWork = YqModelSpUtil.getString("yqModuleSetAfterClockInTimeForWork", "");
        if(yqModuleSetAfterClockInTimeForWork.length()!=0){
            return yqModuleSetAfterClockInTimeForWork;
        }
        return "21:00";
    }*/
}
